import { createWebHistory, createRouter } from "vue-router";
import Login from "../pages/Login.vue";
const routes = [
  { path: "/", name: "login", component: Login },
  {
    path: "/main",
    name: "main",
    redirect: "/home",
    component: () => import("../pages/Main.vue"),
    children: [
      {
        path: "/home",
        name: "home",
        component: () => import("../pages/Home.vue"),
      },
      {
        path: "/importData",
        name: "importData",
        component: () => import("../pages/ImportData.vue"),
      },
      {
        path: "/exportData",
        name: "exportData",
        component: () => import("../pages/ExportData.vue"),
      },
      {
        path: "/viewData",
        name: "viewData",
        component: () => import("../pages/ViewData.vue"),
      },
      {
        path: "/analyzeData",
        name: "analyzeData",
        component: () => import("../pages/AnalyzeData.vue"),
      },
      {
        path: "/ai",
        name: "ai",
        component: () => import("../pages/Ai.vue"),
      },
    ],
  },
];
const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
